The Common Sense of Object
Oriente d P ro gra mmin g
Table of Contents
1
Introduction and summary ............................................................................... 4
2
Roles and Interactions: Visualizing a simple process ................................... 9
3
BabyIDE1, an Environment for true Object-Oriented Programming ........... 15
3. 1 The BB1ClassBrowser .............................................................................. 16
3. 2 The BB1InteractionBrowser ...................................................................... 17
4
BB5Bank: A Simple Money Transfer Program According to DCI ................ 20
4. 1 Money Transfer in the Interaction Perspective .......................................... 20
4. 2 Money Transfer in the ATM Perspective ................................................... 21
4. 3 Money Transfer in the Data Perspective ................................................... 22
4. 4 Money Transfer in the Context Perspective .............................................. 23
4. 5 Testing the Money Transfer application .................................................... 23
5
MVC and DCI - Two paradigms for readable code ........................................ 25
5. 1 MVC: the Model-View-Controller paradigm ............................................... 26
5. 2 DCI: the Data-Context-Interaction paradigm ............................................. 27
5. 2. 1 The Data perspective .................................................................................. 27
5.
2. 2 System behavior: The Context and Interaction perspectives ....................... 28
6
The BB2Shapes Process Visualization Program .......................................... 31
6.
1 The BB2Shapes program seen in the Data perspective............................ 31
6. 2 The BB2Shapes program seen in the Window perspective ...................... 32
6. 2. 1 The BabyShapes2 ArrowsAnimation System Operation .............................. 34
ArrowsAnimation in the Context perspective ............................................................ 34
ArrowsAnimation in the Interaction perspective ....................................................... 35
6.
2. 2 The ShapesAnimation use case .................................................................. 36
ShapesAnimation in the Context perspective ........................................................... 37
ShapesAnimation in the Interaction perspective....................................................... 37
7
BB4bPlan: An Activity Network Planning Program with DCI ....................... 39
7.
1 The BB4b Data perspective ...................................................................... 40
The BB4bModel class ............................................................................................... 41
The BB4bActivity class ............................................................................................. 41
The BB4bDependency class .................................................................................... 42
7. 2 The BB4b Controller perspective .............................................................. 42
7. 3 The BB4b>>frontload System Operation .................................................. 43
7. 3. 1 BB4b frontload in the Interaction perspective .............................................. 44
7. 3. 2 BB4b frontload in the Context perspective .................................................. 45
7. 4 The BB4b View perspective ...................................................................... 46
BB4bActivityView ...................................................................................................... 46
BB4bDependencyView ............................................................................................. 47
BB4bGanttView ......................................................................................................... 47
7. 5 The BB4DependencyView>>refresh System Operation............................ 48
7. 5. 1 BB4bDependencyView>>refresh in the Interaction perspective .................. 48
7. 5. 2 BB4bDependencyView>>refresh in the Context perspective ....................... 49
7. 6 The BB4bGanttView>>refresh operation .................................................. 50
7. 6. 1 BB4bGanttView>>reset in the Interaction perspective ................................. 51
7.
6. 2 BB4bGanttView>>refresh in the Context perspective .................................. 52
8
BB4aPlan: A Conventional Activity Network Planning Program ................. 53
8.
1 BB4a Data classes .................................................................................... 53
Activity ....................................................................................................................... 53
Dependency .............................................................................................................. 53
Model ........................................................................................................................ 53